#!/usr/bin/python
# -*- coding: UTF-8 -*-


import KeyboardLib

msg = "测试键盘按键对应值"
print(msg)
while True:
    key= KeyboardLib.readkey()
    print(key)
    if key=='\x10':
        print('上')
    if key=='\x11':
        print('下')
    if key=='\x12':
        print('右')
    if key=='\x13':
        print('左')
    if key=='\x03':
        print("退出")
        break
